package com.liu.controller;


import com.liu.entity.User;
import com.liu.service.intf.UserService;
import com.liu.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;



@RestController
@RequestMapping("/api/user/")
public class UserController {
    @Autowired
    private UserService userService;
    //登录
    @PostMapping("quwryOne.do")
    public R login(User user){
        System.out.println(user);

        return userService.login(user);
    }
    //修改
    @PostMapping("update.do")
    public R update(User user){

        return userService.upda(user);
    }
    //删除
    @PostMapping("del.do")
    public R del(User user){
        return userService.del(user);
    }
}
